package com.ce.common.util;

import java.util.List;

/**
 * Created by llh on 2017/2/10
 */

public class ObjectUtil {
    public static boolean isEmpty(String string) {
        string=string.replace(" ","");
        return string == null || string.length() == 0 || string.equals("null");
    }

    public static boolean isNull(Object obj) {
        return obj == null;
    }

    public static boolean isEmptyList(List list) {
        return list == null || list.isEmpty();
    }

    public static boolean isEmpty(List list) {
        return list == null || list.size() == 0;
    }

    public static boolean notEmpty(List list) {
        return list != null && list.size() > 0;
    }


    public static String getString4Int(int integer) {
        return String.valueOf(integer);
    }

    public static int getInt4String(String string) {

        return Integer.parseInt(string);
    }
}
